#include "comm.hpp"
#include "com.hpp"
int main()
{

    int shmid = Get_shamem();
    char *shmaddr = (char *)shmat(shmid, nullptr, 0);
    int fd = open(FIFO_FILE, O_WRONLY);
    if (fd < 0)
    {
        log(Info, "errno string: %s , errno code: %d", strerror(errno), errno);
        exit(FIFO_OPEN_ERR);
    }

    while (true)
    {
        write(fd, "c", 1);
        cout << "please Enter: ";
        fgets(shmaddr, 4096, stdin);
    }
    shmdt(shmaddr);
    return 0;
}